<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 横屏 */
        @media screen and (orientation: landscape) {
            body {
                background: red;
            }
        }
        /* 竖屏 */
        @media screen and (orientation: portrait) {
            body {
                background: pink;
            }
        }
    </style>
    <link rel="stylesheet" href="" media="screen and (max-width: 100px)"> //  可通过link标签的meta属性动态使用外部样式
</head>
<body>

</body>
</html>